package basis;

import java.util.Arrays;
import java.util.Scanner;

/**
 * 杨辉三角形
 * 
 * @author 71936_000
 * 
 */
public class Demo3_YangHui {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int m = sc.nextInt();
		int[][] yanghui = new int[m][m];

		for (int i = 0; i < m; i++) {
			for (int n = 0; n < m - i; n++) {
				System.out.print(" ");
			}
			for (int j = 1; j <= i; j++) {
				yanghui[0][0] = 1;
				yanghui[i][j] = yanghui[i - 1][j] + yanghui[i - 1][j - 1];
				System.out.print(yanghui[i][j] + " ");
			}
			System.out.println();
		}
	}
}
